package com.bootdo.common.scheduler;

import com.alibaba.fastjson.JSON;
import com.bootdo.provider.service.GoodsInfoService;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * Created by clq on 2018/5/7
 */
@Component
public class MyScheduler  implements Job {
    @Autowired
    private GoodsInfoService goodsInfoService;
    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        System.out.println("SchedulerJob2 event number:"+JSON.toJSON(goodsInfoService.get(1L)));
        //System.out.println(" "+l);
    }
}
